/**
 *Copyright (c) 2003, 2018, UMF and/or its affiliates. All rights reserved.
 */
package com.umf.b2b.model.member;

import com.umf.b2b.MerchantBaseRequest;
import com.umpay.dto.UMFResponse.Message;
import com.umpay.util.UMFUtil;

/**
<p>Title:BalanceWithdrawal</p>  
<p>Description: �˻�����</p>
 */
public class BalanceWithdrawal extends MerchantBaseRequest{
	
	private String notify_url;
	private String order_id;//*����ش� [��Ӧ����] �̻����ɵı�ʶ�ñʽ��׵ı�ţ������ű���Ψһ����Ž�֧�����֡�Ӣ����ĸ���ʹ�ã�����Ϊ�ַ�����
	private String mer_date;//*����ش� [��Ӧ����] �̻�ƽ̨���ɶ��������ڣ���ʽYYYYMMDD
	private String user_id;//*����ش� �����ɹ�����
	private String user_type;//*����ش� 1�������̻�2�����幤�̻�3����ҵ�̻�
	private String p_agreement_id;//*����ش� �󿨳ɹ����ã�һ��Э��Ŷ�Ӧ�û��󶨵�һ�����п�
	private String amount;//*����ش� [��Ӧ����] ���ֽ��,�������н����Է�Ϊ��λ
	private String remark;//*����ش� ��ע��Ϣ
	private String url = "/withdrawal/balanceWithdrawal";

	private String trade_no;//[��Ӧ����] ����ƽ̨��Ըñ��������ɵ�Ψһ��ˮ�š�
	private String mer_check_date;//[��Ӧ����] ����ƽ̨���ɵĸñ����ֵ����ڣ�����ƽ̨�����ƽ̨����ʱʹ�ø���������׼��
	private String com_amt;//[��Ӧ����] �����ѽ���λ��
	
	@Override
	public String getRequestUrl() {
		return baseUrl + url;
	}

	@Override
	public BalanceWithdrawal doRequest() throws Exception {
		Message<BalanceWithdrawal> response = UMFUtil.post(createAPIContext(), this,BalanceWithdrawal.class);
		MerchantBaseRequest baseResult = convertResult(response, BalanceWithdrawal.class);
		if(baseResult == null)
			return null;
		return (BalanceWithdrawal)baseResult;
	}

	public String getMer_id() {
		return mer_id;
	}

	public void setMer_id(String mer_id) {
		this.mer_id = mer_id;
	}

	public String getUser_id() {
		return user_id;
	}

	public void setUser_id(String user_id) {
		this.user_id = user_id;
	}

	public String getNotify_url() {
		return notify_url;
	}

	public void setNotify_url(String notify_url) {
		this.notify_url = notify_url;
	}

	public String getOrder_id() {
		return order_id;
	}

	public void setOrder_id(String order_id) {
		this.order_id = order_id;
	}

	public String getMer_date() {
		return mer_date;
	}

	public void setMer_date(String mer_date) {
		this.mer_date = mer_date;
	}

	public String getUser_type() {
		return user_type;
	}

	public void setUser_type(String user_type) {
		this.user_type = user_type;
	}

	public String getP_agreement_id() {
		return p_agreement_id;
	}

	public void setP_agreement_id(String p_agreement_id) {
		this.p_agreement_id = p_agreement_id;
	}

	public String getAmount() {
		return amount;
	}

	public void setAmount(String amount) {
		this.amount = amount;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public String getTrade_no() {
		return trade_no;
	}

	public void setTrade_no(String trade_no) {
		this.trade_no = trade_no;
	}

	public String getMer_check_date() {
		return mer_check_date;
	}

	public void setMer_check_date(String mer_check_date) {
		this.mer_check_date = mer_check_date;
	}

	public String getCom_amt() {
		return com_amt;
	}

	public void setCom_amt(String com_amt) {
		this.com_amt = com_amt;
	}

	@Override
	public String toString() {
		StringBuilder builder = new StringBuilder();
		builder.append("BalanceWithdrawal [notify_url=");
		builder.append(notify_url);
		builder.append(", order_id=");
		builder.append(order_id);
		builder.append(", mer_date=");
		builder.append(mer_date);
		builder.append(", user_id=");
		builder.append(user_id);
		builder.append(", user_type=");
		builder.append(user_type);
		builder.append(", p_agreement_id=");
		builder.append(p_agreement_id);
		builder.append(", amount=");
		builder.append(amount);
		builder.append(", remark=");
		builder.append(remark);
		builder.append(", url=");
		builder.append(url);
		builder.append(", trade_no=");
		builder.append(trade_no);
		builder.append(", mer_check_date=");
		builder.append(mer_check_date);
		builder.append(", com_amt=");
		builder.append(com_amt);
		builder.append(", version=");
		builder.append(version);
		builder.append(", mer_id=");
		builder.append(mer_id);
		builder.append(", ret_code=");
		builder.append(ret_code);
		builder.append(", ret_msg=");
		builder.append(ret_msg);
		builder.append(", links=");
		builder.append(links);
		builder.append("]");
		return builder.toString();
	}

}
